<template>
    <a href="/show">显示</a>
    <h2>信息修改</h2>
    <table class="table">
        <thead>
            <tr>
                <th>房型名称</th>
                <th>
                    <input type="text" v-model="data.hname">
                </th>
            </tr>
            <tr>
                <th>门市销售价格</th>
                <th>
                    <input type="text" v-model="data.picture">
                </th>
            </tr>
            <tr>
                <th>房间数</th>
                <th>
                    <input type="text" v-model="data.fjs">
                </th>
            </tr>
            <tr>
                <th>状态</th>
                <th>
                    <input type="radio" v-model="data.zt" name="zt" value="1">启用
                    <input type="radio" v-model="data.zt" name="zt" value="2">停用
                </th>
            </tr>
            <tr>
                <th>房间号</th>
                <th>

                    <input type="text" v-model="data.fjh">
                    <!-- <input type="checkbox" v-model="data.fjh" >1001
                    <input type="checkbox" v-model="data.fjh" >1002
                    <input type="checkbox" v-model="data.fjh" >1003 -->
                    <!-- <input type="checkbox"  name="fjh"v-model="data.fjh"value="4" >1004
                    <input type="checkbox" name="fjh"v-model="data.fjh" value="5" >1005
                    <input type="checkbox" name="fjh"v-model="data.fjh" value="6" >1006
                    <input type="checkbox" name="fjh"v-model="data.fjh" value="7" >1007
                    <input type="checkbox" name="fjh"v-model="data.fjh" value="8" >1008 -->
                </th>
            </tr>
            <tr>
                <th></th>
                <th>
                    <input type="button" value="修改" @click="audd">
                </th>
            </tr>
        </thead>
    </table>
</template>

<script setup lang="ts">
import axios from 'axios';
import { ref } from 'vue';

const data=ref({
    "hid": 0,
  "hname": "",
  "picture":"",
  "fjs": "",
  "zt": 0,
  "fjh":"",
  //"deleteID": true
})


const audd=()=>{
    axios.post("https://localhost:7093/api/VS/Add",data.value).then(res=>{
        if(res.data>0)
    {
        alert('修改成功')
    }
    else
    {
        alert('修改失败')
        return;
    }
    })
}
</script>

<style scoped>

</style>